home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Very Best of Atari Inside
/
The Very Best of Atari Inside 1.iso
/
mint
/
mntlib43
/
mntlib
/
strrev.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-07-06
|
420b
|
27 lines
/* from Dale Schumacher's dLibs library */
/* if you chage the behaviour so that it does not reverse in-place
* please change mktemp.c too (it assumes rev is in-place)
*/
#include <string.h>
char *strrev(string)
char *string;
{
register char *p = string, *q, c;
if(*(q = p)) /* non-empty string? */
{
while(*++q)
;
while(--q > p)
{
c = *q;
*q = *p;
*p++ = c;
}
}
return(string);
}